<%-- 
    Document   : News
    Created on : 19-mag-2014, 16.05.35
    Author     : micheleprola
--%>

<%@page import="entity.News"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <title>SportingEventClub - News</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" type="text/css" href="CSS/BaseSite.css" />
        <link rel="stylesheet" type="text/css" href="CSS/vertical-ticker.css"/>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
        <script type="text/javascript" src="JQuery/jquery.totemticker.js"></script> 
        <script type="text/javascript" src="JQuery/jquery.pajinate.js"></script>
        <link rel="shortcut icon" href= "Images/stadion-icon.png"/>
        <script type="text/javascript">
            $(document).ready(function(){
                $('#paging_container2').pajinate({
                    items_per_page  : 10,
                    nav_label_first : '<<',
                    nav_label_last : '>>',
                    nav_label_prev : '<',
                    nav_label_next : '>'
                });
            });				
        </script>
        <script type="text/javascript">
            $(document).ready(function(){
                $('li:odd, .paging > *:odd');
            });
	</script>
        <script type="text/javascript">
        $(function(){
          $(".text").each(function(i){
            len=$(this).text().length;
            if(len>150)
            {
              $(this).text($(this).text().substr(0,150)+'...');
            }
          });
        });
        </script>
    </head>
    <body>         
        <div class="main">
            <div class="page">
                <div class="header">       
                    <div class="login">
                        <%@include file="login.jsp"%>
                    </div>
                    <div class="banner">
                    </div>
                    <div class="topmenu">
                        <%@include file="topmenu.jsp" %>
                    </div>
                </div>
                <div class="content">
                    <div class="content-in">
                        <div class="left-panel">
                            <div class="left-panel-in">
                                <%List<News> n = (List)request.getAttribute("listanews");%>
                                <div id="paging_container2">
                                    <ul class="paging">
                                        <%for(News n1: n){
                                            String[] tit = n1.getTitoloNews().split(":");
                                            String[] data = n1.getDataNews().toString().split("-");%>
                                                <li><table width="100%" border="0">
                                                <tr><td width="75"><p style="text-align: center;font-size: 9px;font-family: Lucida Grande,Helvetica,Arial,sans-serif;background-color:#FF6633;">  <%=(tit[0])%> </p></td><td><a href="GeneralController?submit=singolanews&op=singolanews&id=<%=n1.getId()%>" style="text-decoration:underline; color:#000;"> <%=tit[1]%> </a></td><td style="text-align: right;"> <%=data[2] + "-" + data[1] + "-" + data[0]%> </td></tr>
                                                <tr><td></td><td colspan="2"><p style="font-size: 13px;" class="text"> <%=n1.getDescNews()%> </p></td></tr></table></li>
                                        <%}%>
                                    </ul>
                                    <p style="align:center;"><div class="page_navigation"></div></p>
                                </div>
                            </div>
                        </div>
                        <div class="right-panel">
                            <div class="right-panel-in">
                                <jsp:include page="/GeneralController">
                                    <jsp:param name="submit" value="right-content"/>
                                    <jsp:param name="op" value="newsbox"/>
                                </jsp:include>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="footer">
                    <%@include file="footer.jsp"%> 
                </div>
            </div>
        </div> 
    </body>
</html>
